<?php
/**
 * This is the base CMS item form.
 */
class DigCms_Form_StringReplace extends Dig_Form_Abstract
{
    /**
     * Creates the standard item form
     *
     * This form contains a hidden id field, a field for the name and the submit buttons.
     * It also sets the form class to ajaxForm, so the CMS can process it with AJAX
     * 
     * @param array $options
     */
    public function __construct($options = array())
    {
        parent::__construct($options);
        
        $this->setAttrib('class', 'ajaxForm');
        $this->setAction('/digCms/util/global-string-replace');
        
        $this->addElement('text', 'string', array(
            'label'	    => 'String',
            'required'	=> true
        ));

        $this->addElement('text', 'replacement', array(
            'label'	    => 'Replacement',
            'required'	=> false
        ));
        
        $submit = $this->addElement('submit', 'save', array('label' => 'Search and Replace', 'decorators' => array('ViewHelper')));
        
    }
    
}
?>